From d94fb682991c5ba91ddcd0aa4b4888bc9913adb5 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Thu, 9 Dec 2010 08:30:30 +0000 Subject: [PATCH] sched/arinc653: fix another unsigned < 0 comparison replacing it with a test of the appopriate unsigned max. Signed-off-by: Tim Deegan --- xen/common/sched_arinc653.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/sched_arinc653.c b/xen/common/sched_arinc653.c index d563834297..e0cab17fc3 100644 --- a/xen/common/sched_arinc653.c +++ b/xen/common/sched_arinc653.c @@ -241,7 +241,7 @@ arinc653_sched_set( found_dom0 = 1; /* Check for a valid VCPU ID and run time. */ - if ( (schedule->sched_entries[i].vcpu_id < 0) + if ( (schedule->sched_entries[i].vcpu_id >= MAX_VIRT_CPUS) || (schedule->sched_entries[i].runtime <= 0) ) goto fail; -- 2.30.2